import java.util.InputMismatchException;
import java.util.Random;
import java.util.Scanner;

public class wzm {
    static int count = 2;
    public static void main(String[] args) {
        System.out.println("欢迎来到猜数字小游戏");
        Random r = new Random();
        int number = r.nextInt(10);
        Scanner scan = new Scanner(System.in);
        try {
            while (count >= 0) {
                if (count == 0) {
                    System.out.println("你是否要继续游戏");
                    String xx =  scan.next();
                    System.out.println(xx);
                    if(xx.equals("y")){
                        count = 7;
                        number = r.nextInt(10);
                        System.out.println("游戏已从新开始，请输入你猜测的数字");
                    }
        }


    }



}
